|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.vtp.framework.engine.runtime.RuntimeUtils
public final class RuntimeUtils
Utilities used by the various runtime components.
| Constructor Summary | |
|---|---|
RuntimeUtils()
|
|
| Method Summary | |
|---|---|
static java.lang.Object |
createInstance(java.lang.Class type)
Creates a new instance of the specified class via Class.newInstance(). |
static java.lang.Object |
createInstance(java.lang.reflect.Constructor constructor,
java.lang.Object[] arguments)
Creates a new instance of the specified class via the supplied constructor. |
static java.lang.String |
getQualifiedIdentifier(java.lang.String identifier,
java.lang.String qualifier)
Generates a unique string from the supplied qualifier and identifier. |
static java.lang.String |
getXMLIdentifier(org.w3c.dom.Element element)
Generates a unique string from the supplied element's name space URI and tag name. |
static void |
listTypeHierarchy(java.lang.Class type,
java.util.Set types)
Adds the specified type and all its super-types to the supplied set. |
static void |
setProperty(java.lang.Object instance,
java.lang.reflect.Method mutator,
java.lang.Object value)
Sets a property on an object instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RuntimeUtils()
| Method Detail |
|---|
public static java.lang.String getQualifiedIdentifier(java.lang.String identifier,
java.lang.String qualifier)
throws java.lang.NullPointerException
identifier - The identifier to be qualified.qualifier - The qualifier of the identifier.
java.lang.NullPointerException - If supplied identifier is null.
java.lang.NullPointerException - If supplied qualifier is null.
public static java.lang.String getXMLIdentifier(org.w3c.dom.Element element)
throws java.lang.NullPointerException
element - The element to generate the identifier for.
java.lang.NullPointerException - If supplied element is null.
public static void listTypeHierarchy(java.lang.Class type,
java.util.Set types)
throws java.lang.NullPointerException
type - The type to list the hierarchy of.types - The set to populate with classes.
java.lang.NullPointerException - If the supplied set is null.
public static java.lang.Object createInstance(java.lang.Class type)
throws java.lang.IllegalStateException,
java.lang.NullPointerException
Class.newInstance().
type - The type of object to create.
java.lang.IllegalStateException - If the object creation fails.
java.lang.NullPointerException - If the supplied type is null.
public static java.lang.Object createInstance(java.lang.reflect.Constructor constructor,
java.lang.Object[] arguments)
throws java.lang.IllegalStateException,
java.lang.NullPointerException
constructor - The constructor to create the object with.arguments - The arguments to satisfy the constructor with.
java.lang.IllegalArgumentException - If the supplied constructor argument array
has more or less elements than the specified constructor does
arguments.
java.lang.IllegalStateException - If the object creation fails.
java.lang.NullPointerException - If the supplied constructor is
null.
java.lang.NullPointerException - If the supplied constructor argument array or
any of its elements are null.
public static void setProperty(java.lang.Object instance,
java.lang.reflect.Method mutator,
java.lang.Object value)
throws java.lang.IllegalStateException,
java.lang.NullPointerException
instance - The instance to set the property on.mutator - The property mutator method to invoke.value - The value to set the property to.
java.lang.IllegalArgumentException - If the supplied mutator does not take
exactly one argument.
java.lang.IllegalStateException - If the object creation fails.
java.lang.NullPointerException - If the supplied instance is null.
java.lang.NullPointerException - If the supplied mutator is null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||